#ifndef RELATION_H
#define RELATION_H

#include <string>

namespace SemanticModel
{
	//! Type of a relation.
	enum RelationType
	{
		NoneRelation,
		ContainsRelation,
		ImplementationRelation,
		IsRelation,
		CanRelation,
		SpecifyRelation,
		UsesRelation,
		DecoratesRelation
	};
	
	const RelationType OperationOperationRelations[] = { DecoratesRelation };
	const RelationType OperationClassRelations[] = { UsesRelation };
	const RelationType ClassOperationRelations[] = { CanRelation, SpecifyRelation };
	const RelationType ClassClassRelations[] = { ContainsRelation, IsRelation, ImplementationRelation };

	class Model;

	//! Base relation.
	class Relation
	{
	private:
		RelationType _type;
	public:
		Relation(RelationType type)
		{
			_type = type;
		}

	public:
		//! Get name of a object.
		//! @return
		//!		Name of a object.
		virtual const RelationType type() const { return _type; }

		static wchar_t* nameOf(const RelationType relation);
	};
}

#endif // RELATION_H